<? if ($c = stack('name')) {

	$d = component_data($c); 
	$s = component_settings($c);
	
	if ($s['hide_answers']) { 

ob_start(); ?><script type="text/javascript">
jQuery(function($) {
	$("#cpn-<?=$c?>-block dt").toggle( function(){ $(this).next().show() }, function(){ $(this).next().hide() } );
});
</script><? $SCRIPT[] = ob_get_clean(); ?>
	
<style type="text/css">
	#cpn-<?=$c?>-block dd {display:none}
	#cpn-<?=$c?>-block dt {cursor:pointer}
</style>
	
	<? }

	?><div id="cpn-<?=$c?>-block" class="FAQ-block"><div class="b-caption"><?=$s['caption']?></div><?
	
	if (sizeof($d)) { ?><dl><?
		foreach($d = component_data($c) as $id => $v) {
			?><dt><?=$v['title']?></dt>
				<dd><?=$v['body']?></dd>
			<?
		}
	?></dl><? }
	
	?><div class="clearer"></div><?
	
	if (sizeof($d = $s['paging']['data'])) {	?><ul class="b-paging"><?
		foreach ($d as $v) { ?><li class="<?=($v['first'] ? ' first' : '').($v['last'] ? ' last' : '')?>"><?
			if ($v['url']) {
				?><a href="<?=$v['url']?>" title="<?=$v['title']?>"><?=$v['title']?></a><?
			} else {
				if ($v['title']) {
					?><strong><?=$v['title']?></strong><?
				} else {
					?><span>...</span><?
				}
			}
			?></li><?
		}
		?></ul><?
	}
	
	?></div><?
	
	unstack();
} ?>